package domain;

import java.util.*;

public class User {
    private String username;
    private String password;
    private String email;
    private String unit;
    private String registertime;
    private String realname;
    private String phone;
    private String birth;

    /**
     * @return the username
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the unit
     */
    public String getUnit() {
        return unit;
    }

    /**
     * @param unit the unit to set
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * @return the registertime
     */
    public String getRegistertime() {
        return registertime;
    }

    /**
     * @param registertime the registertime to set
     */
    public void setRegistertime(String registertime) {
        this.registertime = registertime;
    }

    /**
     * @return the realname
     */
    public String getRealname() {
        return realname;
    }

    /**
     * @param realname the realname to set
     */
    public void setRealname(String realname) {
        this.realname = realname;
    }

    /**
     * @return the phone
     */
    public String getPhone() {
        return phone;
    }

    /**
     * @param phone the phone to set
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * @return the birth
     */
    public String getBirth() {
        return birth;
    }

    /**
     * @param birth the birth to set
     */
    public void setBirth(String birth) {
        this.birth = birth;
    }

    @Override
    public int hashCode() {
        return Objects.hash(birth, email, password, phone, realname, registertime, unit, username);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        User other = (User) obj;
        return Objects.equals(birth, other.birth) && Objects.equals(email, other.email)
                && Objects.equals(password, other.password) && Objects.equals(phone, other.phone)
                && Objects.equals(realname, other.realname) && Objects.equals(registertime, other.registertime)
                && Objects.equals(unit, other.unit) && Objects.equals(username, other.username);
    }

    @Override
    public String toString() {
        return "User [username=" + username + ", password=" + password + ", email=" + email + ", unit=" + unit
                + ", registertime=" + registertime + ", realname=" + realname + ", phone=" + phone + ", birth=" + birth
                + "]";
    }

}